import Axios from "axios"

export default class workhistory {
    static work = null

    static getInstance(){
        if(this.work == null){
            this.work = new workhistory()
        }
        return this.work
    }
    //高级查询
    list(hre){
        return Axios.get(`http://localhost/workhistory/all`,{params:hre});
    }
    //高级查询
    listByempId(hre){
        return Axios.get(`http://localhost/workhistory/allByid/${hre}`);
    }
    //根据Id查询
    listByid(id){
        return Axios.get(`http://localhost/workhistory/${id}`)
    }
    //添加员工
    save(hre){
        return Axios.post("http://localhost/workhistory/add",hre)
    }
    //修改
    update(hre){
        return Axios.put("http://localhost/workhistory/update",hre)
    }
    //删除
    remove(id){
        return Axios.delete(`http://localhost/workhistory/${id}`)
    }
}